home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
sort2.zip
/
BVAL.FUN
< prev
next >
Wrap
Text File
|
1993-01-04
|
339b
|
11 lines
function bval(s:string):real;
{ coerces a real value from the s argument 'garbage-999.9999e-99garbage' }
{ Copyright 1989, by J. W. Rider }
var r:real; code,i,l:integer;
begin if reversed then bval:=-1.7e38 else bval:=1.7e38;
i:=posnum(s,l);
if i<>0 then val(copy(s,i,l),r,code);
if code=0 then bval:=r;
end; { function bval }